﻿<div ng-if="vm.result && vm.result.pageCount > 1" class="pagination">

    <button title="Previous page"
            type="button"
            class="btn pager previous"
            ng-click="vm.setPage(vm.result.pageNumber - 1)"
            ng-if="!vm.isFirstPage">
        <i class="fa fa-chevron-left"></i>
    </button>

    <button title="Previous page" 
            type="button"
            class="btn pager previous disabled"
            ng-if="vm.isFirstPage"
            disabled>
        <i class="fa fa-chevron-left"></i>
    </button>

    <div class="info disabled">{{ vm.result.pageNumber }} of {{ vm.result.pageCount }}</div>

    <button title="Next page"
            type="button"
            class="btn pager next"
            ng-click="vm.setPage(vm.result.pageNumber + 1)"
            ng-if="!vm.isLastPage">
        <i class="fa fa-chevron-right"></i>
    </button>

    <button title="Next page"
            type="button"
            class="btn pager next disabled"
            ng-if="vm.isLastPage"
            disabled>
        <i class="fa fa-chevron-right"></i>
    </button>
</div>